/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title 消费者
 * @Description 生产者
 * @Package concurrent.blockingQueue.bqtest3
 * @date 2021/3/22 4:45 下午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package concurrent.blockingQueue.bqtest3;

public class Producer implements Runnable {

    BQTestQueue3<String> bqTestQueue3;

    public Producer(BQTestQueue3<String> bqTestQueue3) {
        this.bqTestQueue3 = bqTestQueue3;
    }

    @Override
    public void run() {
        int count = 0;
        for (; ; ) {
            try {
                bqTestQueue3.push("推送第" + count + "条msg");
                count++;
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
